#include <iostream>
#include <string>

class Student
{
public:
    void SetID(int a)
    {
        id = a;
    }
    void SetName(const std::string& n)
    {
        name = n;
    }
    void show() //成员函数（方法）
    {
        std::cout<<id<<" "<<name<<std::endl;
    }
private:
    int id; //成员变量（属性)
    std::string name;
};

int main()
{
    Student s;
    s.SetID(10);
    s.SetName("zhangsan");
    s.show();

    return 0;
}